package com.duoec.doc.openfeign;


import com.duoec.doc.dto.response.Dept;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * @author xuwenzhen
 * @chapter 组织架构
 * @section 部门
 */
@FeignClient(value = "MICRO_SERVICE_CLOUD_PROVIDER_DEPT", primary = true)
public interface DeptFeignClient {
    /**
     * 获取部门信息
     *
     * @param id 部门ID
     * @return 部门信息
     */
    @RequestMapping(value = "/dept/get/{id}", method = RequestMethod.GET)
    Dept get(@PathVariable("id") int id);

    /**
     * 获取部门列表
     *
     * @return 部门列表
     */
    @RequestMapping(value = "/dept/list", method = RequestMethod.GET)
    List<Dept> list();
}
